﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace AdventureWorksService.Web
{
	public class CustomerList : List<Customer>
	{
	}

	//    [Required]
	//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
	//    [StringLength(32)]
	//    public string Xyz { get; set; }
	public class Customer
	{
		[Key()]
		//public int CustomerID { get; set; }
		[Display()]
		public Guid CustomerID { get; set; }
		[Required]
		[StringLength(128)]
		public string CompanyName { get; set; }
		[Required]
		[StringLength(50)]
		public string FirstName { get; set; }
		[Required]
		[StringLength(50)]
		public string LastName { get; set; }
		[StringLength(50)]
		public string EmailAddress { get; set; }
		[StringLength(25)]
		public string Phone { get; set; }
	}

	public class vwCustomer
	{
		[Key()]
		public Guid CustomerID { get; set; }
		public string CompanyName { get; set; }
		public string FirstName { get; set; }
		public string LastName { get; set; }
	}

	public class ProductList : List<Product>
	{
	}

	public class Product
	{
		[Key()]
		[Required]
		public Guid ProductID { get; set; }
		[Required]
		[StringLength(50)]
		public string Name  { get; set; }
		[Required]
		[StringLength(25)]
		public string ProductNumber   { get; set; }
		[StringLength(15)]
		public string Color  { get; set; }
		public decimal StandardCost   { get; set; }
		public decimal ListPrice   { get; set; }
		public int Size  { get; set; }
		public decimal Weight { get; set; } //decimal
		public DateTime SellStartDate   { get; set; }
	}
	public class vwProduct
	{
		[Key()]
		public Guid ProductID { get; set; }
		public string Name  { get; set; }
		public string Color { get; set; }
		public int Size { get; set; }
	}
}
